package com.example.umikadmin;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Button add_guard= (Button)findViewById(R.id.add_guard_button);
		Button view_staff= (Button)findViewById(R.id.viev_staff_button);
		Button view_map= (Button)findViewById(R.id.view_map_button);
		
		add_guard.setOnClickListener(this);
		view_staff.setOnClickListener(this);
		view_map.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		switch(v.getId())	
		{
			case R.id.add_guard_button:
				Intent _new= new Intent(this,AddGuard.class);
				this.startActivity(_new);
				break;
			case R.id.viev_staff_button:
				Intent _new1= new Intent(this,ViewStaff.class);
				this.startActivity(_new1);
				break;
			case R.id.view_map_button:
				Intent _new2= new Intent(this,MapView.class);
				this.startActivity(_new2);
				break;
			default:
				break;
		}
	}

}
